#include<iostream>
using namespace std;

void print(char* arr)
{
	cout << arr << endl;
}

int main()
{
	cout.setf(ios_base::fixed, ios_base::floatfield);
	
	int* pi = new int;
	*pi = 114;
	double* pd = new double;
	*pd = 114.514;
	int* parr = new int [10];
	string* pstr = new string;
	char arr[] = "abcd";
	*pstr = "abcd";
	parr[0] = 1;
	parr[9] = 10;
	cout << "position " << pi << " is " << *pi << endl;
	cout << "position " << pd << " is " << *pd << endl;
	cout << "int arr elements:" << parr[0] << " " << parr[9] << endl;
	cout << "new string is valid:" << *pstr << endl;
	cout << arr << endl;
	print(arr);
	
	delete pi;
	delete pd;
	delete [] parr;
	
	return 0;
}
